<template>
  <div>
    <h2>{{ title }}</h2>
    <v-chart :forceFit="true" :height="height" :data="data" :scale="scale">
      <v-tooltip />
      <v-axis />
      <v-bar position="year*sales" />
    </v-chart>
  </div>
</template>

<script>
const data = [
  { year: 'host1', sales: 38 },
  { year: 'host2', sales: 52 },
  { year: 'host3', sales: 61 },
  { year: 'host4', sales: 145 },
  { year: 'host5', sales: 48 }
]

const scale = [
  {
    dataKey: 'sales',
    tickInterval: 20,
  },
]

export default {
  name: 'LeakAssetGroupBar',
  data() {
    return {
      title: '漏洞资产组Top5',
      data,
      scale,
      height: 300,
    }
  },
}
</script>
